extends ./main_temp

block panelHeading 
 <div class="row " style="padding:0px 20px">
          <div class="inline-block">
            <button type="button" class="btn btn-success" onclick="insert()">添加</button>
          </div>
          <div class="inline-block">
            <button type="button" class="btn btn-danger" onclick="delBatch(event)">选中删除</button>
          </div>
          <div class="inline-block">
            <button type="button" class="btn btn-danger" onclick="clean()">批量删除</button>
          </div>
          <form class="form-inline .input-sm pull-right" style="padding-top: 0px;">
            <div class="btn-group">
              <label for="exampleInputEmail2"></label>
              <input  id="start" type="date" class="form-control" placeholder="开始日期" name="name">
            </div>
            <div class="btn-group" >
              <label for="exampleInputEmail2"></label>
              <input id="end" type="date" class="form-control" placeholder="结束日期" name="name">
            </div>
            <div class="btn-group" id="dormlist">
              <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" name="dorm" id="dormbtn"> 全部宿舍楼 <span class="caret"></span>
              </button>
            </div>

            <div class="btn-group" id="stulist">
              <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" name="namebox"id="namebtn"> 姓名 <span class="caret"></span>
              </button>
            </div>
            <div class="form-group">
              <label for="exampleInputEmail2"></label>
              <input type="text" class="form-control" placeholder="姓名" name="name">
            </div>
            <button type="button" class="btn btn-default" aria-label="Left Align" onclick="search()">
              <span class="glyphicon glyphicon-search" aria-hidden="true"></span>
            </button>
          </form>
        </div>

include ./datatable
block panelBody
    -  let titles = ["<input name='cb_select_all' type='checkbox'>","序号","日期", "学号", "姓名", "宿舍楼", "寝室", "备注"];
    +datatable(titles)
         each item in stulist.length ? stulist : []
                tr 
                    td(class="text-center")!= "<input name='cb_select_all' type='checkbox'>"
                    td(class="text-center")!=item.id
                    td(class="text-center")!=item.name 
                    td(class="text-center")!=item.gender
                    td(class="text-center")!=item.phone
                    td(class="text-center")!=item.dorm 
                    td(class="text-center")!=item.dormroom 

    +pagination({
        count:100,
        total:5,
        pageNum:1,
        firstNum:1,
        lastNum:10,
        options:[2,5,10]
    })